package com.ubs.lingua.buildtool.cs;

/**
 * <p><code>CsBuilderException</code> thrown by the Lingua C# Build Agent
 * instead of any specific exception of third-party libraries.</p> 
 * <p>Original exception thrown by the third-party library is replaced
 * in order to avoid having this third-party in RMI caller's claspath.</p> 
 */
public class CsBuilderException extends RuntimeException {

    private static final long serialVersionUID = -8208380466297262904L;

    /**
     * Constructs a new exception with <code>null</code> as its detail message.
     */
    public CsBuilderException() {
        super();
    }

    /**
     * Constructs a new exception with the specified detail message.
     * 
     * @param message the detail message. The detail message is saved for later retrieval by the {@link #getMessage()} method.
     */
    public CsBuilderException(final String message) {
        super(message);
    }

    /**
     * Constructs a new exception with the specified detail message and cause.
     *
     * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
     * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
     */
    public CsBuilderException(final String message, final Throwable cause) {
        super(message, cause);
    }

    /**
     * Constructs a new exception with the specified detail message and stack trace.
     *
     * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
     * @param stackTrace the stack trace (which is saved for later retrieval by the {@link #getCause()} method).
     */
    public CsBuilderException(final String message, final StackTraceElement[] stackTrace) {
        super(message);
        this.setStackTrace(stackTrace);
    }

    /**
     * Constructs a new exception with the specified cause and a detail message of
     * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains the class and detail message of <tt>cause</tt>).
     *
     * @param cause the cause (which is saved for later retrieval by the {@link #getStackTrace()} method).
     */
    public CsBuilderException(final Throwable cause) {
        super(cause);
    }

}
